home *** CD-ROM | disk | FTP | other *** search
/ Chip 2006 June (Extra) / CHIP 2006-06.3.iso / program / opensource / clamav-devel.exe / contrib / Windows / clamavw.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2006-05-16  |  2.9 KB  |  112 lines

  1. // clamavw.cpp : implementation of the CClamavView class
  2. //
  3.  
  4. /*
  5.  *  Copyright (C) 2004 Nigel Horne <njh@bandsman.co.uk>
  6.  *
  7.  *  This program is free software; you can redistribute it and/or modify
  8.  *  it under the terms of the GNU General Public License as published by
  9.  *  the Free Software Foundation; either version 2 of the License, or
  10.  *  (at your option) any later version.
  11.  *
  12.  *  This program is distributed in the hope that it will be useful,
  13.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.  *  GNU General Public License for more details.
  16.  *
  17.  *  You should have received a copy of the GNU General Public License
  18.  *  along with this program; if not, write to the Free Software
  19.  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  20.  *  MA 02110-1301, USA.
  21.  */
  22. #include "stdafx.h"
  23. #include "clamav.h"
  24.  
  25. #include "clamadoc.h"
  26. #include "clamavw.h"
  27.  
  28. #ifdef _DEBUG
  29. #undef THIS_FILE
  30. static char BASED_CODE THIS_FILE[] = __FILE__;
  31. #endif
  32.  
  33. /////////////////////////////////////////////////////////////////////////////
  34. // CClamavView
  35.  
  36. IMPLEMENT_DYNCREATE(CClamavView, CView)
  37.  
  38. BEGIN_MESSAGE_MAP(CClamavView, CView)
  39.     //{{AFX_MSG_MAP(CClamavView)
  40.     //}}AFX_MSG_MAP
  41.     // Standard printing commands
  42.     ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
  43.     ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
  44. END_MESSAGE_MAP()
  45.  
  46. /////////////////////////////////////////////////////////////////////////////
  47. // CClamavView construction/destruction
  48.  
  49. CClamavView::CClamavView()
  50. {
  51.     // TODO: add construction code here
  52.  
  53. }
  54.  
  55. CClamavView::~CClamavView()
  56. {
  57. }
  58.  
  59. /////////////////////////////////////////////////////////////////////////////
  60. // CClamavView drawing
  61.  
  62. void CClamavView::OnDraw(CDC* pDC)
  63. {
  64.     CClamavDoc* pDoc = GetDocument();
  65.     ASSERT_VALID(pDoc);
  66.  
  67.     // TODO: add draw code for native data here
  68. }
  69.  
  70. /////////////////////////////////////////////////////////////////////////////
  71. // CClamavView printing
  72.  
  73. BOOL CClamavView::OnPreparePrinting(CPrintInfo* pInfo)
  74. {
  75.     // default preparation
  76.     return DoPreparePrinting(pInfo);
  77. }
  78.  
  79. void CClamavView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
  80. {
  81.     // TODO: add extra initialization before printing
  82. }
  83.  
  84. void CClamavView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
  85. {
  86.     // TODO: add cleanup after printing
  87. }
  88.  
  89. /////////////////////////////////////////////////////////////////////////////
  90. // CClamavView diagnostics
  91.  
  92. #ifdef _DEBUG
  93. void CClamavView::AssertValid() const
  94. {
  95.     CView::AssertValid();
  96. }
  97.  
  98. void CClamavView::Dump(CDumpContext& dc) const
  99. {
  100.     CView::Dump(dc);
  101. }
  102.  
  103. CClamavDoc* CClamavView::GetDocument() // non-debug version is inline
  104. {
  105.     ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CClamavDoc)));
  106.     return (CClamavDoc*)m_pDocument;
  107. }
  108. #endif //_DEBUG
  109.  
  110. /////////////////////////////////////////////////////////////////////////////
  111. // CClamavView message handlers
  112.